﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="产品理化参数模板.aspx.cs" Inherits="syc.ZhiJian.产品理化参数模板" %>
<html>
<head id="Head1" runat="server">
    <title></title>
</head>
<body>    
    <script type="text/javascript" language="javascript" src="/common.js"></script>
  <form id="form1" runat="server">
    <div class="wintop">产品理化参数信息</div>
    

    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
        SelectCommand="SELECT [ID], [名称] FROM [原料供货单位]">
    </asp:SqlDataSource>
    <asp:Panel ID="Panel2" runat="server" CssClass="panel" Visible=false>
    
<table width="642" border="1" cellspacing="0" cellpadding="0"   style=" border-color:#000000"> 

  <tr>
    <td colspan="10"><div align="center">化学成分(%)</div></td>
  </tr>
  <tr>
    <td width="83" height="18"><div align="center">产品</div></td>
    <td colspan="2"><div align="center">供应商</div> </td>   
    <td width="59"><div align="center">C</div></td>
    <td width="59"><div align="center">Mn</div></td>
    <td width="64"><div align="center">Si</div></td>
    <td width="67"><div align="center">P</div></td>
    <td width="78"><div align="center">S</div></td>
    <td width="79"><div align="center">Cr</div></td>
    <td width="78"><div align="center">Ni</div></td>
  </tr>
 
  <tr>
     <td><asp:DropDownList ID="DropDownList2" runat="server">
            <asp:ListItem Value="1">油管(J55)</asp:ListItem>
            <asp:ListItem Value="2">套管(J55)</asp:ListItem>
            <asp:ListItem Value="3">油管(N80)</asp:ListItem>
            <asp:ListItem Value="4">套管(N80)</asp:ListItem>
        </asp:DropDownList></td>
    <td colspan="2"><div align="center">
       <asp:DropDownList ID="DropDownList1" runat="server" 
        DataSourceID="SqlDataSource2" DataTextField="名称" DataValueField="ID" 
            AutoPostBack="true">
       </asp:DropDownList>
      <asp:TextBox ID="LuHao0" runat="server" Width="77px"   
        onkeypress="if (event.keyCode==13) event.returnValue=false"        
            CssClass="textbox"></asp:TextBox>
    </div></td>
    <td><div align="center">
      <asp:TextBox ID="C" runat="server" Width="44px" 
            onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  
            CssClass="textbox"></asp:TextBox>
    </div></td>
    <td><div align="center">
      <asp:TextBox ID="Mn" runat="server" Width="44px" 
            onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  
            CssClass="textbox"></asp:TextBox>
    </div></td>
    <td><div align="center">
      <asp:TextBox ID="Si" runat="server" Width="44px" 
            onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  
            CssClass="textbox"></asp:TextBox>
    </div></td>
    <td><div align="center">
      <asp:TextBox ID="P" runat="server" Width="44px" 
            onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  
            CssClass="textbox"></asp:TextBox>
    </div></td>
    <td><div align="center">
      <asp:TextBox ID="S" runat="server" Width="44px" 
            onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  
            CssClass="textbox"></asp:TextBox>
    </div></td>
    <td><div align="center">
      <asp:TextBox ID="Cr" runat="server" Width="44px" 
            onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  
            CssClass="textbox"></asp:TextBox>
    </div></td>
    <td><div align="center">
      <asp:TextBox ID="Ni" runat="server" Width="44px" 
            onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  
            CssClass="textbox"></asp:TextBox>
    </div></td>
  </tr>
  <tr>
    <td><div align="center">Cu</div></td>
    <td><div align="center">Mo</div></td>
    <td colspan="2"><div align="center">Al</div></td>
    <td><div align="center">V</div></td>
    <td><div align="center">Bi</div></td>
    <td><div align="center">Sn</div></td>
    <td><div align="center">Pb</div></td>
    <td><div align="center">As</div></td>
    <td><div align="center">Sb</div></td>
  </tr>
  <tr>
    <td><div align="center">
      <asp:TextBox ID="Cu" runat="server" Width="44px" 
            onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  
            CssClass="textbox"></asp:TextBox>
    </div></td>
    <td><div align="center">
      <asp:TextBox ID="Mo" runat="server" Width="44px" 
            onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  
            CssClass="textbox"></asp:TextBox>
    </div></td>
    <td colspan="2"><div align="center">
      <asp:TextBox ID="Al" runat="server" Width="44px" 
            onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  
            CssClass="textbox"></asp:TextBox>
    </div></td>
    <td><div align="center">
      <asp:TextBox ID="V" runat="server" Width="44px" 
            onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  
            CssClass="textbox"></asp:TextBox>
    </div></td>
    <td><div align="center">
      <asp:TextBox ID="Bi" runat="server" Width="44px" 
            onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  
            CssClass="textbox"></asp:TextBox>
    </div></td>
    <td><div align="center">
      <asp:TextBox ID="Sn" runat="server" Width="44px" 
            onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  
            CssClass="textbox"></asp:TextBox>
    </div></td>
    <td><div align="center">
      <asp:TextBox ID="Pb" runat="server" Width="44px" 
            onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  
            CssClass="textbox"></asp:TextBox>
    </div></td>
    <td><div align="center">
      <asp:TextBox ID="As" runat="server" Width="44px" 
            onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  
            CssClass="textbox"></asp:TextBox>
    </div></td>
    <td><div align="center">
      <asp:TextBox ID="Sb" runat="server" Width="44px" 
            onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  
            CssClass="textbox"></asp:TextBox>
    </div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td colspan="5"><div align="center">拉伸试验(纵向)</div></td>
    <td colspan="4"><div align="center">冲击试验</div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td colspan="2"><div align="center">抗拉强度</div></td>
    <td colspan="2"><div align="center">屈伸极限</div></td>
    <td><div align="center">伸长率</div></td>
    <td colspan="2"><div align="center">横向冲击</div></td>
    <td colspan="2"><div align="center">纵向冲击</div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td colspan="2"><div align="center">
      <asp:TextBox ID="klqd" runat="server" Width="98%"  CssClass="textbox" onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  ></asp:TextBox>
    </div></td>
    <td colspan="2"><div align="center">
      <asp:TextBox ID="qsjx" runat="server" Width="98%"  CssClass="textbox" onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  ></asp:TextBox>
    </div></td>
    <td><div align="center">
      <asp:TextBox ID="scl" runat="server" Width="98%"  CssClass="textbox"  onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  ></asp:TextBox>
    </div></td>
    <td colspan="2"><div align="center">
      <asp:TextBox ID="hx" runat="server" Width="98%" ReadOnly="true"  CssClass="textbox" onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  style="TEXT-ALIGN:   center">合格</asp:TextBox>
    </div></td>
    <td colspan="2"><div align="center">
      <asp:TextBox ID="zx" runat="server" Width="98%" ReadOnly="true" onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<32 ||(event.keyCode>32&&event.keyCode<48) || event.keyCode>57)) event.returnValue=false  "  style="TEXT-ALIGN:   center"
            CssClass="textbox">合格</asp:TextBox>
    </div></td>
  </tr>
  <tr>
    <td width="83" height="18"><div align="center">通径检验</div></td>
    <td colspan="3"><div align="center">静水压试验</div></td>
    <td colspan="2"><div align="center">无损探伤</div></td>
    <td colspan="2"><div align="center">表面检验</div></td>
    <td colspan="2"><div align="center">尺寸</div></td>
  </tr>
  <tr>
    <td width="83" height="18" align="center"><div align="center">
        <asp:TextBox ID="tj" runat="server" Width="98%" ReadOnly="true"  CssClass="textbox" style="TEXT-ALIGN:   center" onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false">合格</asp:TextBox>
        </div></td>
    <td colspan="3" align="center"><div align="center">
        <asp:TextBox ID="jsy" runat="server" Width="98%" ReadOnly="true"  CssClass="textbox" style="TEXT-ALIGN:   center" onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false">合格</asp:TextBox>
        </div></td>
    <td colspan="2" align="center"><div align="center">
        <asp:TextBox ID="ws" runat="server" Width="98%" ReadOnly="true"  CssClass="textbox" style="TEXT-ALIGN:   center" onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false">合格</asp:TextBox>
        </div></td>
    <td colspan="2" align="center"><div align="center">
        <asp:TextBox ID="bm" runat="server" Width="98%" ReadOnly="true"  CssClass="textbox" style="TEXT-ALIGN:   center" onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false">合格</asp:TextBox>
        </div></td>
    <td colspan="2" align="center"><div align="center">
        <asp:TextBox ID="cc" runat="server" Width="98%"  ReadOnly="true"  CssClass="textbox" style="TEXT-ALIGN:   center" onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false">合格</asp:TextBox>
        </div></td>
  </tr>
</table>

    </asp:Panel>

    <asp:Panel ID="Panel3" runat="server" CssClass="panel2" >
        <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt"></asp:Label>
    </asp:Panel>
    
     <div class="gridframe">
        <div class="gridview">
        
            <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#e5cfab">
	            <tr>
		            <td class="grid-title">产品理化参数  <tr>
		            <td class="grid-back">
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" SelectCommand="SELECT [供货商ID], [产品ID], [C], [Mn], [Si], [P], [S], [Cr], [Ni], [Cu], [Mo], [Al], [V], [Bi], [Sn], [Pb], [As], [Sb], [抗拉强度], [屈服极限], [伸长率] FROM [产品理化参数模板]"                    
                            >
                                                 
                            </asp:SqlDataSource>
                        <asp:GridView ID="GridView1" runat="server" AllowPaging="True"  
                             AutoGenerateColumns="False" CssClass="grid" 
                            GridLines="None" ondatabound="GridView1_DataBound" 
                            onpageindexchanged="GridView1_PageIndexChanged" AllowSorting="True" 
                            UseAccessibleHeader="False" DataSourceID="SqlDataSource1" 
                            DataKeyNames="供货商ID,产品ID" >
                            <PagerSettings Visible="False" />
                            <RowStyle CssClass="grid-row-normal" />
                            <SelectedRowStyle   CssClass="grid-row-bright" />
                            <Columns>
                                <asp:BoundField DataField="供货商ID" HeaderText="供货商ID" ReadOnly="True" 
                                    SortExpression="供货商ID" />
                                <asp:BoundField DataField="产品ID" HeaderText="产品ID" ReadOnly="True" 
                                    SortExpression="产品ID" />
                                <asp:BoundField DataField="C" HeaderText="C" SortExpression="C" />
                                <asp:BoundField DataField="Mn" HeaderText="Mn" SortExpression="Mn" />
                                <asp:BoundField DataField="Si" HeaderText="Si" SortExpression="Si" />
                                <asp:BoundField DataField="P" HeaderText="P" SortExpression="P" />
                                <asp:BoundField DataField="S" HeaderText="S" SortExpression="S" />
                                <asp:BoundField DataField="Cr" HeaderText="Cr" SortExpression="Cr" />
                                <asp:BoundField DataField="Ni" HeaderText="Ni" SortExpression="Ni" />
                                <asp:BoundField DataField="Cu" HeaderText="Cu" SortExpression="Cu" />
                                <asp:BoundField DataField="Mo" HeaderText="Mo" SortExpression="Mo" />
                                <asp:BoundField DataField="Al" HeaderText="Al" SortExpression="Al" />
                                <asp:BoundField DataField="V" HeaderText="V" SortExpression="V" />
                                <asp:BoundField DataField="Bi" HeaderText="Bi" SortExpression="Bi" />
                                <asp:BoundField DataField="Sn" HeaderText="Sn" SortExpression="Sn" />
                                <asp:BoundField DataField="Pb" HeaderText="Pb" SortExpression="Pb" />
                                <asp:BoundField DataField="As" HeaderText="As" SortExpression="As" />
                                <asp:BoundField DataField="Sb" HeaderText="Sb" SortExpression="Sb" />
                                <asp:BoundField DataField="抗拉强度" HeaderText="抗拉强度" SortExpression="抗拉强度" />
                                <asp:BoundField DataField="屈服极限" HeaderText="屈服极限" SortExpression="屈服极限" />
                                <asp:BoundField DataField="伸长率" HeaderText="伸长率" SortExpression="伸长率" />
                            </Columns>
                          </asp:GridView>
		            </td>
	            </tr>
	            <tr>
		            <td>   
		                 <table width="100%">
		                    <tr>
		                        <td class="pagebar">
                                    <asp:Button ID="Button_Pager_First" runat="server" Text="" ToolTip="首页" 
                                        CssClass="pageturn-first-b" onclick="Pager_Click" CommandName="--" />
                                    <asp:Button ID="Button_Pager_Prev" runat="server" Text="" ToolTip="上一页" 
                                        CssClass="pageturn-prev-b" onclick="Pager_Click" CommandName="-" />
                                    <input type="button" class="page-split" />第<asp:TextBox ID="TextBox_Pager" runat="server" CssClass="pageturn" 
                                        ontextchanged="Pager_Click"></asp:TextBox>页<input type="button" class="page-split" /><asp:Label ID="Label_Pages" runat="server"></asp:Label><input type="button" class="page-split" />
                                    
                                    <asp:Button ID="Button_Pager_Next" runat="server" Text="" ToolTip="下一页" 
                                        CssClass="pageturn-next-b" onclick="Pager_Click" CommandName="+" />
                                    <asp:Button ID="Button_Pager_Last" runat="server" Text="" ToolTip="末页" 
                                        CssClass="pageturn-last-b" onclick="Pager_Click" CommandName="++" />
                                </td>
                                <td align="right">
                                    <asp:Label ID="Label_Total" runat="server" CssClass="grid_totalrows"></asp:Label>
                                </td>
                            </tr>
                       </table>

		            </td>
	            </tr>
            </table>
            

        </div>
    </div>
    <script>
        var textboxs = document.getElementsByTagName("input");
        var i;
        for (i = 0; i < textboxs.length; i++) {
            if (textboxs[i].className == "textbox") {
                textboxs[i].onchange = function(e) { this.className = "textbox-changed"; };
                textboxs[i].onfocus = function(e) { this.select(); };
            }
            else if (textboxs[i].className == "pageturn" || textboxs[i].className == "intxt1" || textboxs[i].className == "intxt2") {
                textboxs[i].onfocus = function(e) { this.select(); };
            }

        }
        var rows = document.getElementsByTagName("tr");
        for (i = 0; i < rows.length; i++) {

            if (rows[i].className == "grid-row-normal") {
                rows[i].onmouseover = function() { this.className = "grid-row-bright"; };
                rows[i].onmouseout = function() { this.className = "grid-row-normal"; };
                rows[i].onclick = function() { this.firstChild.firstChild.click(); };
            }
        }
        var tds = document.getElementsByTagName("td");
        for (i = 0; i < tds.length; i++) {
            if (tds[i].className == "detailheader") {
                tds[i].innerHTML = tds[i].innerHTML.replace("*", "<span class=required>*</span>");
            }
        }

        document.body.onkeypress = function(e) {
            if (!e) e = window.event;
            var tag = e.srcElement;
            if (!tag) tag = e.target;
            if (tag.className.toLowerCase() != "textbox") return;
            var i;
            if (e.keyCode == 13) {
                for (i = 0; i < textboxs.length; i++) {
                    if (tag == textboxs[i]) {
                        //   alert(i);
                        if (i < textboxs.length - 1) {
                            textboxs[i + 1].focus();
                        }
                        else {
                            textboxs[textboxs.length].focus();
                        }
                    }
                }
            }
        };   
</script>


    </form>
    </body>
</html>